<?php
	include('../../../public/bootrap.php');
	$id = _POST('colorid');
	
	$image = $db->fetchOne("SELECT * FROM tblproduct_color WHERE color_id = $id ");
	
	if(file_exists('../../..'.$image['img_url'] )){
		unlink('../../..'.$image['img_url']);
	}
	
	$delete = $db->delete('tblproduct_color', " color_id = $id ");
	$data	= array(msg=>true);
	print json_encode($data);
	exit();